package com.jmp.base;

import com.jmp.base.dto.*;
import one.stand.model.ResultModel;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 动态\文章API
 */
public interface DynamicApi {
    /**
     * 类型: 1文章 2动态
     */
    int TYPE_ARTICLE = 1;
    int TYPE_DYNAMIC = 2;

    /**
     * 关联类型：1 头条
     */
    int RELATE_ID_ARTICLE = 1;

    int COMMENT_TYPE_ARTICEL = 0;
    int COMMENT_TYPE_VIDEO = 1;

    @PostMapping("/dynamic/save")
    ResultModel save(@RequestBody DynamicSaveRequest request);

    @PostMapping("/dynamic/update/relate")
    ResultModel updateByRelate(@RequestBody DynamicUpdateByRelateRequest request);

    @PostMapping("/dynamic/remove")
    ResultModel remove(@RequestBody DynamicRemoveDto request);

    @PostMapping("/dynamic/delete/relate")
    ResultModel deleteByRelate(@RequestBody DynamicDeleteRelateRequest request);

    /**
     * 评论列表
     */
    @PostMapping("/dynamic/comment/list")
    ResultModel<DynamicCommentListVo> commentList(@RequestBody DynamicCommentListDto request);

    /**
     * 评论保存
     */
    @PostMapping("/dynamic/comment/save")
    ResultModel<DynamicCommentSaveVo> commentSave(@RequestBody DynamicCommentSaveDto request);

    /**
     * 评论删除
     */
    @PostMapping("/dynamic/comment/remove")
    ResultModel commentRemove(@RequestBody DynamicCommentRemoveDto request);

    /**
     * 评论点赞/取消点赞
     */
    @PostMapping("/dynamic/comment/thumbs")
    ResultModel commentThumbs(@RequestBody DynamicCommentThumbsDto request);

    /**
     * 红木圈、店铺动态、我的动态
     */
    @PostMapping("/dynamic/list")
    ResultModel<DynamicListVo> list(@RequestBody DynamicListDto request);
}
